/**
 * Copyright © 2020 易久批信息技术有限公司. All rights reserved.
 */
package com.dysm.templatemethod;

/**
 * 模板方法模式
 * @author xiay
 * @since 2020/12/15 10:31 下午
 */
public class TemplateMethodClient {

    public static void main(String[] args) {
        BankTemplateMethod method = new BankTemplateMethod() {
            @Override
            public void transact() {
                System.out.println("存钱");
            }
        };
        method.process();

        BankTemplateMethod withdraw = new Withdraw();
        withdraw.process();
    }
}
